<template>
	<view class="my-2 flex align-center">
		<image class="moment-img rounded" :src="item.titlepic" mode="aspectFill" @click="openDetail(item)">
		</image>
		<view class="flex flex-column justify-center ml-2">
			<view class="momenu-title text-ellipsis" hover-class="text-main" @click="openDetail(item)">#{{item.title}}#</view>
			<view class="momenu-title text-ellipsis text-muted">{{item.desc}}</view>
			<view class="text-muted">动态 {{item.post_count}} 今日 {{item.todaypost_count}}</view>
		</view>
	</view>
</template>
<script>
	export default {
		props: {
			item: {
				type: Object,
				default: {}
			},
			index:{
				type:Number
			}
		},
		methods:{
			openDetail(item){
				console.log('item',item)
				uni.navigateTo({
					url:'/pages/topic-detail/topic-detail?info='+JSON.stringify(item)
				})
			}
		}
	}
</script>
<style lang="scss">
	.moment-img {
		width: 142rpx;
		height: 142rpx;
	}
	.momenu-title {
		max-width: 548rpx;
	}
</style>